# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Ivy Foster <iff@archlinux.org>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Firmicus <francois.archlinux.org>

_name=junicode
pkgbase=$_name-font
pkgname=(otf-$_name ttf-$_name ttf-$_name-variable)
pkgver=2.203
pkgrel=1
pkgdesc='Font for medievalists'
arch=(any)
url="https://github.com/psb1558/${pkgbase^}"
license=(OFL)
source=("$url/releases/download/v$pkgver/${_name^}_$pkgver.zip")
sha256sums=('a52361ada7b1c2303c35a13c7728254da01ca392cc0e1721ccd935da3f8d664d')

package_otf-junicode() {
    provides=("$pkgbase")
    cd "${_name^}"
    install -Dm0644 -t "$pkgdir/usr/share/fonts/OTF/" OTF/*.otf
    install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" OFL.txt
}

package_ttf-junicode() {
    provides=("$pkgbase")
    cd "${_name^}"
    install -Dm0644 -t "$pkgdir/usr/share/fonts/TTF/" TTF/*.ttf
    install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" OFL.txt
}

package_ttf-junicode-variable() {
    provides=("$pkgbase-variable")
    cd "${_name^}"
    install -Dm0644 -t "$pkgdir/usr/share/fonts/TTF/" VAR/*.ttf
    install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" OFL.txt
}
